home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / accessibility / nsIAccessibleSelectable.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  226 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAccessibleSelectable.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAccessibleSelectable_h__
  6. #define __gen_nsIAccessibleSelectable_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIAccessible_h__
  14. #include "nsIAccessible.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIArray_h__
  18. #include "nsIArray.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25.  
  26. /* starting interface:    nsIAccessibleSelectable */
  27. #define NS_IACCESSIBLESELECTABLE_IID_STR "34d268d6-1dd2-11b2-9d63-83a5e0ada290"
  28.  
  29. #define NS_IACCESSIBLESELECTABLE_IID \
  30.   {0x34d268d6, 0x1dd2, 0x11b2, \
  31.     { 0x9d, 0x63, 0x83, 0xa5, 0xe0, 0xad, 0xa2, 0x90 }}
  32.  
  33. /**
  34.  * An interface for the accessibility module and in-process accessibility clients
  35.  * for dealing with getting and changing the selection of accessible nodes.
  36.  *
  37.  * @status UNDER_REVIEW
  38.  */
  39. class nsIAccessibleSelectable : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IACCESSIBLESELECTABLE_IID)
  43.  
  44.     enum { eSelection_Add = 0U, eSelection_Remove = 1U, eSelection_GetState = 2U };
  45.   /**
  46.      * Return an nsIArray of selected nsIAccessible children 
  47.      */
  48.   /* nsIArray GetSelectedChildren (); */
  49.   NS_IMETHOD GetSelectedChildren(nsIArray **_retval) = 0;
  50.  
  51.   /**
  52.      * Returns the number of accessible children currently selected.
  53.      */
  54.   /* readonly attribute long selectionCount; */
  55.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) = 0;
  56.  
  57.   /**
  58.      * Adds the specified accessible child of the object to the
  59.      * object's selection.
  60.      * If the specified object is already selected, then it does nothing.
  61.      * @throws NS_ERROR_FAILURE if the specified object is not selectable.
  62.      */
  63.   /* void addChildToSelection (in long index); */
  64.   NS_IMETHOD AddChildToSelection(PRInt32 index) = 0;
  65.  
  66.   /**
  67.      * Removes the specified child of the object from the object's selection.
  68.      * If the specified object was not selected, then it does nothing.
  69.      * @throws NS_ERROR_FAILURE if the specified object is not selectable.
  70.      */
  71.   /* void removeChildFromSelection (in long index); */
  72.   NS_IMETHOD RemoveChildFromSelection(PRInt32 index) = 0;
  73.  
  74.   /**
  75.      * Clears the selection in the object so that no children in the object
  76.      * are selected.
  77.      */
  78.   /* void clearSelection (); */
  79.   NS_IMETHOD ClearSelection(void) = 0;
  80.  
  81.   /**
  82.      * Returns a reference to the accessible object representing the specified
  83.      * selected child of the object.
  84.      * @param index Zero-based selected accessible child index 
  85.      * @return The nth selected accessible child
  86.      */
  87.   /* nsIAccessible refSelection (in long index); */
  88.   NS_IMETHOD RefSelection(PRInt32 index, nsIAccessible **_retval) = 0;
  89.  
  90.   /**
  91.       * Determines if the current child of this object is selected
  92.       * @param The zero-based accessible child index
  93.       * @return Returns true if the child is selected, false if not.
  94.       */
  95.   /* boolean isChildSelected (in long index); */
  96.   NS_IMETHOD IsChildSelected(PRInt32 index, PRBool *_retval) = 0;
  97.  
  98.   /**
  99.      * Select all children
  100.      * @return If the object does not accept multiple selection, return false.
  101.      *         Otherwise, returns true.
  102.      */
  103.   /* boolean selectAllSelection (); */
  104.   NS_IMETHOD SelectAllSelection(PRBool *_retval) = 0;
  105.  
  106. };
  107.  
  108. /* Use this macro when declaring classes that implement this interface. */
  109. #define NS_DECL_NSIACCESSIBLESELECTABLE \
  110.   NS_IMETHOD GetSelectedChildren(nsIArray **_retval); \
  111.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount); \
  112.   NS_IMETHOD AddChildToSelection(PRInt32 index); \
  113.   NS_IMETHOD RemoveChildFromSelection(PRInt32 index); \
  114.   NS_IMETHOD ClearSelection(void); \
  115.   NS_IMETHOD RefSelection(PRInt32 index, nsIAccessible **_retval); \
  116.   NS_IMETHOD IsChildSelected(PRInt32 index, PRBool *_retval); \
  117.   NS_IMETHOD SelectAllSelection(PRBool *_retval); 
  118.  
  119. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  120. #define NS_FORWARD_NSIACCESSIBLESELECTABLE(_to) \
  121.   NS_IMETHOD GetSelectedChildren(nsIArray **_retval) { return _to GetSelectedChildren(_retval); } \
  122.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) { return _to GetSelectionCount(aSelectionCount); } \
  123.   NS_IMETHOD AddChildToSelection(PRInt32 index) { return _to AddChildToSelection(index); } \
  124.   NS_IMETHOD RemoveChildFromSelection(PRInt32 index) { return _to RemoveChildFromSelection(index); } \
  125.   NS_IMETHOD ClearSelection(void) { return _to ClearSelection(); } \
  126.   NS_IMETHOD RefSelection(PRInt32 index, nsIAccessible **_retval) { return _to RefSelection(index, _retval); } \
  127.   NS_IMETHOD IsChildSelected(PRInt32 index, PRBool *_retval) { return _to IsChildSelected(index, _retval); } \
  128.   NS_IMETHOD SelectAllSelection(PRBool *_retval) { return _to SelectAllSelection(_retval); } 
  129.  
  130. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  131. #define NS_FORWARD_SAFE_NSIACCESSIBLESELECTABLE(_to) \
  132.   NS_IMETHOD GetSelectedChildren(nsIArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectedChildren(_retval); } \
  133.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectionCount(aSelectionCount); } \
  134.   NS_IMETHOD AddChildToSelection(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddChildToSelection(index); } \
  135.   NS_IMETHOD RemoveChildFromSelection(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveChildFromSelection(index); } \
  136.   NS_IMETHOD ClearSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearSelection(); } \
  137.   NS_IMETHOD RefSelection(PRInt32 index, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RefSelection(index, _retval); } \
  138.   NS_IMETHOD IsChildSelected(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsChildSelected(index, _retval); } \
  139.   NS_IMETHOD SelectAllSelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAllSelection(_retval); } 
  140.  
  141. #if 0
  142. /* Use the code below as a template for the implementation class for this interface. */
  143.  
  144. /* Header file */
  145. class nsAccessibleSelectable : public nsIAccessibleSelectable
  146. {
  147. public:
  148.   NS_DECL_ISUPPORTS
  149.   NS_DECL_NSIACCESSIBLESELECTABLE
  150.  
  151.   nsAccessibleSelectable();
  152.  
  153. private:
  154.   ~nsAccessibleSelectable();
  155.  
  156. protected:
  157.   /* additional members */
  158. };
  159.  
  160. /* Implementation file */
  161. NS_IMPL_ISUPPORTS1(nsAccessibleSelectable, nsIAccessibleSelectable)
  162.  
  163. nsAccessibleSelectable::nsAccessibleSelectable()
  164. {
  165.   /* member initializers and constructor code */
  166. }
  167.  
  168. nsAccessibleSelectable::~nsAccessibleSelectable()
  169. {
  170.   /* destructor code */
  171. }
  172.  
  173. /* nsIArray GetSelectedChildren (); */
  174. NS_IMETHODIMP nsAccessibleSelectable::GetSelectedChildren(nsIArray **_retval)
  175. {
  176.     return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178.  
  179. /* readonly attribute long selectionCount; */
  180. NS_IMETHODIMP nsAccessibleSelectable::GetSelectionCount(PRInt32 *aSelectionCount)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* void addChildToSelection (in long index); */
  186. NS_IMETHODIMP nsAccessibleSelectable::AddChildToSelection(PRInt32 index)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* void removeChildFromSelection (in long index); */
  192. NS_IMETHODIMP nsAccessibleSelectable::RemoveChildFromSelection(PRInt32 index)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* void clearSelection (); */
  198. NS_IMETHODIMP nsAccessibleSelectable::ClearSelection()
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* nsIAccessible refSelection (in long index); */
  204. NS_IMETHODIMP nsAccessibleSelectable::RefSelection(PRInt32 index, nsIAccessible **_retval)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* boolean isChildSelected (in long index); */
  210. NS_IMETHODIMP nsAccessibleSelectable::IsChildSelected(PRInt32 index, PRBool *_retval)
  211. {
  212.     return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214.  
  215. /* boolean selectAllSelection (); */
  216. NS_IMETHODIMP nsAccessibleSelectable::SelectAllSelection(PRBool *_retval)
  217. {
  218.     return NS_ERROR_NOT_IMPLEMENTED;
  219. }
  220.  
  221. /* End of implementation class template. */
  222. #endif
  223.  
  224.  
  225. #endif /* __gen_nsIAccessibleSelectable_h__ */
  226.